<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8">
	<title>分店管理-场地</title>
	<link rel="stylesheet" href="/js/plugin/layui-v2.3.0/layui/css/layui.css">
	<link rel="stylesheet" href="/css/reset.css">
	<link rel="stylesheet" href="/css/index.css">
	<link rel="stylesheet" href="/css/project_set.css">
	<script src="/js/jquery-2.1.1.min.js"></script>
	<script src="/js/plugin/layui-v2.3.0/layui/layui.js"></script>
</head>
<style>
::-webkit-scrollbar-thumb {
  background:#a2a2a2; 
  border-radius: 10px;
  height:50%;
}
::-webkit-scrollbar{width:6px;}
	body{
		overflow-y: scroll;
	} 
</style>
<body>
<div class="kb-out-box">
	<div class="kb-content my-locations-list">	
		<div class="nav-container f-left">
			<div class="nav-container-content">
				<header class="nav-header">
					<h2 class="header-title">统计报表</h2>
				</header>
				<div class="nav-body" id="nav-side">
					<ul class="nav-container-list">
						<li data-src="conferenceRoom" class="nav-container-list-hover"><a href="javascript:void(0)">会议室统计</a></li>
						<li data-src="fieldManage"><a href="javascript:void(0)">场地管理</a></li>
					</ul>
				</div>
			</div>
		</div>	
		<div class="nav-section-container nav-section-container-bg f-right">
			<div style="width: 100%;min-height: 100%; position: relative;" id="iframeSet-wrap">
				<iframe id="iframeSet" src="" frameborder="0" width="100%" height="100%" scroll='no'></iframe>
			</div>
		</div>	
	</div>
</div>
</body>
<script>
$(function(){
	layui.use(['element',"layer","form"], function(){
		var layer=layui.layer,form = layui.form;
	});
	getIframeSetHash();
	setiframeWrap(1000);
	//设置侧边切换
	$("#nav-side").on("click","li",function(){
		var dataSrc=$(this).attr("data-src");
		location.hash='#'+dataSrc;
		getIframeSetHash()
		
	})
})	
//匹配此页面的iframe的hash，给src赋值；
function getIframeSetHash(){
	var layid = location.hash.substr(1),iframeSrc="";
	var projectId=parent.$("#projectId").val();
	$("#nav-side li").removeClass("nav-container-list-hover")
	if(layid==""||layid=='undefined'||layid==null||layid=='conferenceRoom'){//首次进来，会议室统计
		iframeSrc='/app/statistical/conferenceRoom';
		layid='conferenceRoom';
	}
	
	
	$("#nav-side li[data-src='"+layid+"']").addClass("nav-container-list-hover");
    var iframe = document.createElement('iframe');//动态创建iframe，禁止iframe的src回退；
    iframe.src = iframeSrc;
    iframe.width = '100%';
    iframe.height = '100%';
    $("#iframeSet-wrap").html($(iframe));
	//$("#project-iframe").attr("src",iframeSrc);	
}
	
//手动设置iframe容器的高度
function setiframeWrap(h){
	document.getElementById("iframeSet-wrap").style.height = h+"px";
}
</script>
</html>